import { createStore } from "vuex";

export default createStore({
  state: {
    Pintroduce: "",
    showGameDetail: false,
    gameDetailContent: {},
    imgPos: {},
  },
  mutations: {
    // 设置个人简介：跨组件传值，强行用一下vuex
    setIntroduce(state, value) {
      state.Pintroduce = value;
    },
    // 设置img初始位置信息
    setImgInitPos(state, value) {
      state.imgPos = value;
    },
    // 控制展示gameDetail
    setGameDetail(state, value) {
      state.showGameDetail = value;
    },
    // 设置gameDetail内容
    setGameDetailContent(state, value) {
      state.gameDetailContent = value;
    },
  },
  actions: {},
  modules: {},
});
